package com.esyoga.yoyoga.handler;

import com.esyoga.yoyoga.pojo.TStudent;
import com.esyoga.yoyoga.service.StudentDataService;
import lombok.Data;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Data
@Controller
@RequestMapping("/Mydata")
public class StudentDataHandler {
    @Resource
    private StudentDataService mydataService;

    //展示个人信息
    @RequestMapping("/showData")
    @ResponseBody
    public List<TStudent> showData(Integer sId){

        return mydataService.showData(sId);
    }

    //修改个人信息
    @RequestMapping("/updateData")
    @ResponseBody
    public int updateData(Integer sId,TStudent tStudent) {

        return mydataService.updateData(sId,tStudent);
    }

}
